#ifndef LIBRARY_H
#define LIBRARY_H

#include <gtk/gtkdialog.h>
#include <libmpd/libmpd.h>
#include <glade/glade-xml.h>

#define TYPE_LIBRARY (library_get_type())
#define LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, TYPE_LIBRARY, Library))

typedef struct {
	GtkDialog parent;
	MpdObj *mpd;
	GtkTreeView *tv;
} Library ;

typedef struct {
	GtkDialogClass parent;
}LibraryClass;

GType library_get_type();
Library* library_new(MpdObj*, GtkWindow*);
void library_db_changed(Library*);

//utility
struct _TreeState;
typedef struct _TreeState TreeState;
TreeState* library_save_tree_state(GtkTreeView *tv);
void library_restore_tree_state(GtkTreeView *tv, TreeState *state);


#endif //LIBRARY_H
